<template>
  <el-tag v-if="currentStatusKey" :type="EMatterStatusType[currentStatusKey]">
    {{ currentStatusKey }}
  </el-tag>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { EMatterStatus, EMatterStatusType } from '@/components/statusShow/util'

/**
 * 事项状态展示
 */
const { status } = defineProps<{
  status: number | undefined
}>()

const currentStatusKey = computed(() => {
  if (status !== 0 && !status) {
    return null
  }
  return EMatterStatus[status] as keyof typeof EMatterStatus
})
</script>

<style scoped lang="scss"></style>
